/*
 * @Author: zhangfeng
 * @Date: 2023-12-13 18:11:28
 * @LastEditTime: 2024-01-18 18:07:13
 * @LastEditors: zhangfeng
 * @Description:菜单接口文件
 * @FilePath: \manager\managersystem\src\api\menus.ts
 * © 2023 张峰，All rights reserved.
 */
import request from '../utils/request';

// 获取菜单列表
export const getMenus = () => {
	return request({
		url: '/menus',
		method: 'get',
	});
};
// 添加菜单列表
export const postMenus = (query: MenuItem) => {
	return request({
		url: '/menus',
		method: 'post',
		data: query,
	});
};

// 编辑菜单
export const putMenus = (query: MenuItem) => {
	return request({
		url: '/menus',
		method: 'put',
		data: query,
	});
};
// 删除菜单
export const deleteMenus = (id: number) => {
	return request({
		url: '/menus',
		method: 'delete',
		data: { id },
	});
};
